{% extends "base.html" %}
{% block title %}更改密码 - IT资产管理平台{% endblock %}
{% block content %}
<div class="change-password-container">
  <form method="post">
    <div class="form-group">
      <label for="original_password">原密码</label>
      <input type="password" name="original_password" id="original_password" required>
    </div>
    <div class="form-group">
      <label for="new_password">新密码</label>
      <input type="password" name="new_password" id="new_password" required>
    </div>
    <div class="form-group">
      <label for="confirm_new_password">确认新密码</label>
      <input type="password" name="confirm_new_password" id="confirm_new_password" required>
    </div>
    <div class="form-group buttons">
      <button type="submit">确认</button>
      <button type="button" onclick="window.location.href='{{ url_for('home') }}'">取消</button>
    </div>
  </form>
  {% with messages = get_flashed_messages() %}
    {% if messages %}
    <ul class="flashes">
      {% for message in messages %}
      <li>{{ message }}</li>
      {% endfor %}
    </ul>
    {% endif %}
  {% endwith %}
</div>
{% endblock %}
